﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;


public class PairGameEasy
{
    public bool sub(int a, int b, int c, int d)
    {
        if ( c == a && d == b ) return true;
        if (c - d >= a && d >= b)
        {
            if (sub(a, b, c - d, d)) return true;
        }
        if (c >= a && d - c >= b)
        {
            if (sub(a, b, c, d - c)) return true;
        }
        return false;
    }

    public string able(int a, int b, int c, int d)
    {
        bool found = sub(a, b, c, d);
        if ( found ) return "Able to generate";
        else return "Not able to generate";
    }
}

public class CandidatesSelectionEasy
{
    public int[] sort(string[] score, int x)
    {
        SortedList<int, string> scoreList = new SortedList<int, string>();
        for (int i = 0; i < score.Length; i++)
        {
            scoreList.Add(i, score[i]);
        }
        return scoreList.OrderBy(p => p.Value[x]).Select(p => p.Key).ToArray();
    }
}
